'use strict';
var calculate_average = function(collection){
    let arr=[];
    for(let i in collection)
    {
        if(i%2!=0)
        {
            arr.push(collection[i]);
        }
    }
//console.log(arr);
let result= arr.reduce(function(sum,value){
return sum+value;
},0);
return result/arr.length;

}
module.exports = calculate_average;
